import {hrAjax as proFetch} from 'src/hrpub/common/utils/utils';
import handleAllpks from "../../../container/functions/handleAllpks";

export default function getRosterData(callback) {

    const {orgVal, includeCheckedPsn, editTable} = this.props;

    let selectedData = handleAllpks.get(), param_str = '';
    param_str = selectedData.join();

    let postData = {
        param_str,
        pk_org: orgVal == null ? null : orgVal.refpk,
        includeCheckedPsn
    };

    return proFetch({
        url: '/nccloud/hrhi/blacklist/BlackListReportAction.do',
        body: postData,
    })
        .then((res) => {
            if (res.success) {
                callback && callback(res.data)
            }
        });
}
